﻿/**************************************************************
*作者：Leon
*创建时间：2021/12/26 15:26:05
**************************************************************/
using Microsoft.AspNetCore.Http;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;

namespace StudentManagement.Models
{
    public class StudentCreateViewModel
    {
        [Display(Name = "班级名称")]
        [Required]
        public ClassNameEnum? ClassName { get; set; }

        [Required]
        [RegularExpression(@"^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$", ErrorMessage = "邮箱的格式不正确")]
        [Display(Name = "邮箱地址")]
        public string Email { get; set; }

        [Display(Name = "姓名")]
        [Required(ErrorMessage = "请输入名字"), MaxLength(50, ErrorMessage = "名字长度不能超过50个字符")]
        public string Name { get; set; }

        [Display(Name ="图片")]
        public List< IFormFile> Photos { get; set; }
    }
}
